/*
 * MusicLabs, Copyright (C) 2008-2009 Felippe Ragghianti
 * http://code.google.com/p/musiclabs
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


package br.com.music.scale;

/**
 * All notes have a {@link Degree}, or index, relative to root note (the tonic).
 * This taxonomy is handy to deal with relative tones.
 *
 * @version $LastChangedRevision$
 */
public enum Degree {

    TONIC       (0),
    SUPERTONIC  (1),
    MEDIANT     (2),
    SUBDOMINANT (3),
    DOMINANT    (4),
    SUBMEDIANT  (5),
    LEADING     (6);

    private int degree;

    /**
     * Class constructor.
     *
     * @param degree Degree as integer.
     */
    private Degree(Integer degree) {
        this.degree = degree;
    }

    /**
     * Convert Degree to {@link Integer}.
     *
     * @return Degree as integer.
     */
    public int toInteger() {
        return degree;
    }

}
